<template>
    <div class="more-wrap">
        <Header></Header>

        <div class="card-warp">
            <Card dis-hover :style="{minHeight: '500px', width:'80%'}">
                <div class="content" v-html="content"></div>
            </Card>
        </div>
        <Footer></Footer>
    </div>
</template>

<script>
    import Header from '../components/header';
    import Footer from '../components/footer';

    export default {
        name: "dutytable",
        components: {
            Header,
            Footer
        },
        mounted() {

            var ddd = new Date();
            var day =ddd.getDate();
            if(ddd.getMonth()<10){
                var month = "0"+(ddd.getMonth()+1);
            }
            if(ddd.getDate()<10){
                day = "0"+ddd.getDate();
            }
            var datew = ddd.getFullYear()+"-"+month+"-"+day;

            let _this = this;
            this.$http({
                method: 'get',
                url: '/hm/api?m=getDutyInfo&dutyDate=' + datew.toString()
            }).then(function (res) {
                _this.content = res.data;
            }).catch(function (err) {
                console.log(err);
            })
        },
        watch: {
            '$router': 'getParams'
        },
        methods: {

            getQueryVariable(name) {
                const after = window.location.hash.split('?', 2)[1]
                if (after) {
                    const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
                    const r = after.match(reg)
                    if (r != null) {
                        return decodeURIComponent(r[2])
                    } else {
                        return false
                    }
                }
            }
        },
        data() {

            return {

                // content: "<div id=\"contentTxt\" class=\"contentTxt\">\n" +
                //     "\t\t\t\t\t\t\t\t<p style=\"text-align: center; font-size: 18px;\"><img src=\"https://www.ruankao.org.cn/asset/upload/image/20200616/15922724674143.png\" title=\"\" alt=\"\" style=\"font-size: 18px;\"><br style=\"font-size: 18px;\"></p><p style=\"text-align: center; font-size: 18px;\"><img src=\"https://www.ruankao.org.cn/asset/upload/image/20200616/15922726217311.png\" title=\"\" alt=\"\" style=\"font-size: 18px;\"><br style=\"font-size: 18px;\"></p><p style=\"text-align: center; font-size: 18px;\"><img src=\"https://www.ruankao.org.cn/asset/upload/image/20200616/15922726295490.jpg\" title=\"\" alt=\"\" style=\"font-size: 18px;\"><br style=\"font-size: 18px;\"></p><p style=\"text-align: center; font-size: 18px;\"><img src=\"https://www.ruankao.org.cn/asset/upload/image/20200616/15922726535410.jpg\" title=\"\" alt=\"\" style=\"font-size: 18px;\"><br style=\"font-size: 18px;\"></p>\t\t\t\t\t\t\t</div>",
                content:"",
                attr: [
                    {
                        title: "附件1",
                        url: "http://wwww.baidu.com"
                    }
                ],
                mark: "声明：本网站所刊载的所有信息，包括文字、图片、软件、声音、相片、录相、图表，广告、商业信息及电子邮件的全部内容，除特别标明之外，版权归呼和浩特市回民分局所有。未经本网的明确书面许可，任何单位或个人不得以任何方式作全部或局部复制、转载、引用，再造或创造与该内容有关的任何派生产品，否则本网将追究其法律责任。"
            }
        }
    }
</script>

<style scoped>

    .card-warp {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 5px 0;
    }

    .pager {
        display: flex;
        flex-direction: row-reverse;
        margin-top: 10px;
    }

    .page-wrap {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 5px 0;
    }

    .page-wrap-inner {
        width: 80%;
    }


    .article {
        min-height: 90px;
        background-color: #fff;
        display: flex;
        align-items: center;
        flex-direction: column;
    }

    .article .title {
        padding: 20px 0;
        color: #ff0033;
        text-align: center;
        font-size: 30px;
        font-weight: bold;
    }

    .article .time-author-dept {
        font-size: 16px;
        text-align: center;
        margin-bottom: 20px;
    }

    .article .content {
        margin-left: 30px;
        width: 90%;
        min-height: 500px;
    }

    .article .mark {
        width: 85%;
        padding: 10px;
    }
</style>